function AddCar(){}
$.extend(AddCar.prototype,{
    init:function(num){
        this.input.val(num);
        this.input = $(".txts");
        this.number = this.input.val();
        $(".reduce").on("click",$.proxy(function(){
            this.reduce()
        },this))
        $(".adds").on("click",$.proxy(function(){
            this.adds()
        },this))
        this.input.on("change",$.proxy(function(){
            this.change()
        },this))
    },
    reduce:function(){
        this.number --;
        this.number = this.number <= 1 ? 1 : this.number
        this.input.val(this.number);
    },
    adds:function(){
        this.number ++;
        this.input.val(this.number);
    },
    change:function(){
        this.input.val() = this.input.val() <= 1 ? 1 : this.input.val();
        this.number = this.input.val()
    }
})
export default new AddCar();